package com.maimao.zuul.filter;

import com.maimao.core.constant.Constants;
import com.maimao.zuul.config.PropertiesConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 身份校验过虑器
 *
 * @author Administrator
 * @version 1.0
 **/

@Slf4j
@Component
public class LoginFilter extends AbstractLoginFilter {

    @Autowired
    private PropertiesConfig propertiesConfig;

    @Override
    public String getCookieKey() {
        return Constants.USER_TOKEN_SYS;
    }

    @Override
    public void logUri(String uri) {
        log.info(uri);
    }

    @Override
    public List<String> getAllowedPaths() {
        return propertiesConfig.getPath();
    }


}
